{block content}
<h1 n:block="title">{$mainTitle} - {$subtitle}</h1>
{if $estates->count() > 0}
    <div class="estate-list-item" n:foreach="$estates as $estate">        
        <div class="estate-list-image-wrapper">
            <img n:foreach="$estate->related('picture')->where('pic_order', 1) as $pic" src="{$basePath}/{? echo Picture::getThumbPath($pic->path)}" alt="{$pic->description}" />
        </div>
        <div class="estate-list-info">
            <a href="{link Nemovitosti:detail "id" => $estate->id, "nabidka" => NStrings::webalize($estate->title)}" class="estate-list-title">{$estate->title |truncate:70}</a><br />
            <div class="clearfix"></div>
            <div class="estate-list-info-table-wrapper">
                <table>
                    <tr>
                        <td>Lokalita</td>
                        <td>{$estate->town}{*{if !empty($estate->street)}, {$estate->street}{/if}{if !empty($estate->house_number)} {$estate->house_number}{/if}*}</td>
                    </tr>
                    <tr>
                        <td>Cena</td>
                        <td>{$estate->price |number:0:',':' '} {$estate->currency} {if $estate->price_type != "Celkem"}(za m<span class="super">2</span>){/if}</td>
                    </tr>
                    <tr>
                        <td>Stav nabídky</td>                    
                        {if $estate->commission_status == CommissionStatus::AKTIVNI}
                            <td class="commision-active">
                        {elseif $estate->commission_status == CommissionStatus::REZERVACE}
                            <td class="commision-reservation">
                        {elseif $estate->commission_status == CommissionStatus::ZREALIZOVANO}
                            <td class="commision-realized">
                        {else}
                            <td>
                        {/if}
                        {? echo CommissionStatus::$values[$estate->commission_status]}</td>
                    </tr>                
                </table>
            </div>
            {if !empty($estate->registration_number)}
                <div class="registration-number">ev. číslo: {$estate->registration_number}</div>
            {/if}
        </div>
    </div>
{else}
    V této kategorii nebyla nalezena žádná nabídka.
{/if}
{/block}
